/*
 * This file is part of NativeAccessHooks.
 *
 * Copyleft 2014 Mark Jeronimus. All Rights Reversed.
 * https://code.google.com/p/nativeaccesshooks/
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with NativeAccessHooks. If not, see <http://www.gnu.org/licenses/>.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */
package com.digitalmodular.nah.keyboard;

/**
 * Enum containing universal scan codes.
 *
 * Scan codes correspond to a physical key on a keyboard and is language-independent. For all keyboards that have a similar key
 * arrangement, keys in the same location map to the same scan code, regardless of what symbols are printed in the keys. Some
 * keyboards move physical keys around, like the difference between the USA ANSI keyboard with the Backslash left of the Enter key,
 * and the European ISO keyboard with the Backslash above the Enter. Both Backslash keys generate the same scan code. Another
 * example is the Japanese keyboard, which looks like the ANSI layout (if you ignore the extra keys) but the key that had the
 * backslash on it now has the closing square bracket. Because it's in the same place, it still generates the same scan code when
 * pressed.
 *
 * There are 127 basic scan codes. {@link #SC_NONE} is not a scan code but a special code signaling that a key is position-less.
 * There are also 128 extended scan codes, starting at ordinal 128, which were introduced with the 101-key keyboard. It consists
 * mainly of the 'gray keys' (the 10 directional keys between the main area and the numpad) and media keys.
 *
 * Scan codes that are specific to a certain keyboard have not been named because they can serve different purposes on different
 * keyboards. The enum constants have the hexadecimal code as the name, possibly prefixed with <code>EX_</code> when it concerns an
 * extended scan code.
 *
 * This list is not guaranteed to be complete, and it's not guaranteed that existing constants will remain available in future
 * versions if I find new codes or codes that turn out to be not universal.
 *
 * @author Mark Jeronimus
 * @since 1.0
 * @see VirtualKey
 */
// date 2014-09-11
public enum ScanCode {
	SC_NONE,					// 00
	SC_ESCAPE,					// 01
	SC_1,						// 02
	SC_2,						// 03
	SC_3,						// 04
	SC_4,						// 05
	SC_5,						// 06
	SC_6,						// 07
	SC_7,						// 08
	SC_8,						// 09
	SC_9,						// 0A
	SC_0,						// 0B
	SC_MINUS,					// 0C
	SC_EQUALS,					// 0D
	SC_BACK_SPACE,				// 0E
	SC_TAB,						// 0F
	SC_Q,						// 10
	SC_W,						// 11
	SC_E,						// 12
	SC_R,						// 13
	SC_T,						// 14
	SC_Y,						// 15
	SC_U,						// 16
	SC_I,						// 17
	SC_O,						// 18
	SC_P,						// 19
	SC_OEM_4_BRACELEFT,			// 1A
	SC_OEM_6_BRACERIGHT,		// 1B
	SC_ENTER,					// 1C
	SC_LCONTROL,				// 1D
	SC_A,						// 1E
	SC_S,						// 1F
	SC_D,						// 20
	SC_F,						// 21
	SC_G,						// 22
	SC_H,						// 23
	SC_J,						// 24
	SC_K,						// 25
	SC_L,						// 26
	SC_OEM_1_SEMICOLON,			// 27
	SC_OEM_7_QUOTE,				// 28
	SC_OEM_3_BACK_QUOTE,		// 29
	SC_LSHIFT,					// 2A
	SC_OEM_5_BACKSLASH,			// 2B
	SC_Z,						// 2C
	SC_X,						// 2D
	SC_C,						// 2E
	SC_V,						// 2F
	SC_B,						// 30
	SC_N,						// 31
	SC_M,						// 32
	SC_COMMA,					// 33
	SC_PERIOD,					// 34
	SC_OEM_2_SLASH,				// 35
	SC_36,						// 36
	SC_NUMPAD_MULTIPLY,			// 37
	SC_LALT,					// 38
	SC_SPACE,					// 39
	SC_CAPS_LOCK,				// 3A
	SC_F1,						// 3B
	SC_F2,						// 3C
	SC_F3,						// 3D
	SC_F4,						// 3E
	SC_F5,						// 3F
	SC_F6,						// 40
	SC_F7,						// 41
	SC_F8,						// 42
	SC_F9,						// 43
	SC_F10,						// 44
	SC_PAUSE,					// 45
	SC_SCROLL_LOCK,				// 46
	SC_NUMPAD_HOME,				// 47
	SC_NUMPAD_UP,				// 48
	SC_NUMPAD_PAGE_UP,			// 49
	SC_NUMPAD_SUBTRACT,			// 4A
	SC_NUMPAD_LEFT,				// 4B
	SC_NUMPAD_CLEAR,			// 4C
	SC_NUMPAD_RIGHT,			// 4D
	SC_NUMPAD_ADD,				// 4E
	SC_NUMPAD_END,				// 4F
	SC_NUMPAD_DOWN,				// 50
	SC_NUMPAD_PAGE_DOWN,		// 51
	SC_NUMPAD_INSERT,			// 52
	SC_NUMPAD_DELETE,			// 53
	SC_SYS_REQ,					// 54
	SC_55,						// 55
	SC_OEM_102_BACKSLASH,		// 56
	SC_F11,						// 57
	SC_F12,						// 58
	SC_59,						// 59
	SC_5A,						// 5A
	SC_F13,						// 5B
	SC_F14,						// 5C
	SC_F15,						// 5D
	SC_5E,						// 5E
	SC_5F,						// 5F
	SC_60,						// 60
	SC_61,						// 61
	SC_62,						// 62
	SC_F16,						// 63
	SC_F17,						// 64
	SC_F18,						// 65
	SC_F19,						// 66
	SC_F20,						// 67
	SC_F21,						// 68
	SC_F22,						// 69
	SC_F23,						// 6A
	SC_F24,						// 6B
	SC_6C,						// 6C
	SC_6D,						// 6D
	SC_6E,						// 6E
	SC_6F,						// 6F
	SC_IME_KATAKANA,			// 70
	SC_71,						// 71
	SC_72,						// 72
	SC_OEM_JP_BACKSLASH,		// 73
	SC_74,						// 74
	SC_75,						// 75
	SC_76,						// 76
	SC_IME_FURIGANA,			// 77
	SC_78,						// 78
	SC_IME_CONVERT,				// 79
	SC_7A,						// 7A
	SC_IME_NO_CONVERT,			// 7B
	SC_7C,						// 7C
	SC_OEM_YEN,					// 7D
	SC_IME_NUMPAD_COMMA,		// 7E
	SC_7F,						// 7F
	SC_EX_00,					// 00 ext
	SC_EX_01,					// 01 ext
	SC_EX_02,					// 02 ext
	SC_EX_03,					// 03 ext
	SC_EX_04,					// 04 ext
	SC_EX_05,					// 05 ext
	SC_EX_06,					// 06 ext
	SC_BATTERY,					// 07 ext
	SC_EX_08,					// 08 ext
	SC_EX_09,					// 09 ext
	SC_EX_0A,					// 0A ext
	SC_EX_0B,					// 0B ext
	SC_EX_0C,					// 0C ext
	SC_NUMPAD_EQUALS,			// 0D ext
	SC_EX_0E,					// 0E ext
	SC_EX_0F,					// 0F ext
	SC_MEDIA_PREV_TRACK,		// 10 ext
	SC_EX_11,					// 11 ext
	SC_EX_12,					// 12 ext
	SC_EX_13,					// 13 ext
	SC_EX_14,					// 14 ext
	SC_EX_15,					// 15 ext
	SC_EX_16,					// 16 ext
	SC_EX_17,					// 17 ext
	SC_EX_18,					// 18 ext
	SC_MEDIA_NEXT_TRACK,		// 19 ext
	SC_EX_1A,					// 1A ext
	SC_EX_1B,					// 1B ext
	SC_NUMPAD_ENTER,			// 1C ext
	SC_RCONTROL,				// 1D ext
	SC_EX_1E,					// 1E ext
	SC_EX_1F,					// 1F ext
	SC_VOLUME_MUTE,				// 20 ext
	SC_LAUNCH_APP2,				// 21 ext
	SC_MEDIA_PLAY_PAUSE,		// 22 ext
	SC_EX_23,					// 23 ext
	SC_MEDIA_STOP,				// 24 ext
	SC_EX_25,					// 25 ext
	SC_EX_26,					// 26 ext
	SC_EX_27,					// 27 ext
	SC_EX_28,					// 28 ext
	SC_EX_29,					// 29 ext
	SC_EX_2A,					// 2A ext
	SC_EX_2B,					// 2B ext
	SC_MEDIA_EJECT,				// 2C ext
	SC_EX_2D,					// 2D ext
	SC_VOLUME_DOWN,				// 2E ext
	SC_EX_2F,					// 2F ext
	SC_VOLUME_UP,				// 30 ext
	SC_EX_31,					// 31 ext
	SC_BROWSER_HOME,			// 32 ext
	SC_EX_33,					// 33 ext
	SC_EX_34,					// 34 ext
	SC_NUMPAD_DIVIDE,			// 35 ext
	SC_RSHIFT,					// 36 ext
	SC_PRINT_SCREEN,			// 37 ext
	SC_RALT,					// 38 ext
	SC_EX_39,					// 39 ext
	SC_EX_3A,					// 3A ext
	SC_EX_3B,					// 3B ext
	SC_APP_MUSIC,				// 3C ext
	SC_EX_3D,					// 3D ext
	SC_EX_3E,					// 3E ext
	SC_EX_3F,					// 3F ext
	SC_EX_40,					// 40 ext
	SC_EX_41,					// 41 ext
	SC_EX_42,					// 42 ext
	SC_EX_43,					// 43 ext
	SC_EX_44,					// 44 ext
	SC_NUM_LOCK,				// 45 ext
	SC_BREAK,					// 46 ext
	SC_GRAY_HOME,				// 47 ext
	SC_GRAY_UP,					// 48 ext
	SC_GRAY_PAGE_UP,			// 49 ext
	SC_EX_4A,					// 4A ext
	SC_GRAY_LEFT,				// 4B ext
	SC_EX_4C,					// 4C ext
	SC_GRAY_RIGHT,				// 4D ext
	SC_EX_4E,					// 4E ext
	SC_GRAY_END,				// 4F ext
	SC_GRAY_DOWN,				// 50 ext
	SC_GRAY_PAGE_DOWN,			// 51 ext
	SC_GRAY_INSERT,				// 52 ext
	SC_GRAY_DELETE,				// 53 ext
	SC_EX_54,					// 54 ext
	SC_EX_55,					// 55 ext
	SC_EX_56,					// 56 ext
	SC_EX_57,					// 57 ext
	SC_EX_58,					// 58 ext
	SC_EX_59,					// 59 ext
	SC_EX_5A,					// 5A ext
	SC_LWINDOWS,				// 5B ext
	SC_RWINDOWS,				// 5C ext
	SC_CONTEXT_MENU,			// 5D ext
	SC_POWER,					// 5E ext
	SC_SLEEP,					// 5F ext
	SC_EX_60,					// 60 ext
	SC_EX_61,					// 61 ext
	SC_EX_62,					// 62 ext
	SC_WAKE,					// 63 ext
	SC_APP_PICTURES,			// 64 ext
	SC_BROWSER_SEARCH,			// 65 ext
	SC_BROWSER_FAVORITES,		// 66 ext
	SC_BROWSER_REFRESH,			// 67 ext
	SC_BROWSER_STOP,			// 68 ext
	SC_BROWSER_FORWARD,			// 69 ext
	SC_BROWSER_BACK,			// 6A ext
	SC_LAUNCH_APP1,				// 6B ext
	SC_LAUNCH_MAIL,				// 6C ext
	SC_LAUNCH_MEDIA_SELECT,		// 6D ext
	SC_EX_6E,					// 6E ext
	SC_EX_6F,					// 6F ext
	SC_EX_70,					// 70 ext
	SC_EX_71,					// 71 ext
	SC_EX_72,					// 72 ext
	SC_EX_73,					// 73 ext
	SC_EX_74,					// 74 ext
	SC_EX_75,					// 75 ext
	SC_EX_76,					// 76 ext
	SC_EX_77,					// 77 ext
	SC_EX_78,					// 78 ext
	SC_EX_79,					// 79 ext
	SC_EX_7A,					// 7A ext
	SC_EX_7B,					// 7B ext
	SC_EX_7C,					// 7C ext
	SC_EX_7D,					// 7D ext
	SC_EX_7E,					// 7E ext
	SC_EX_7F,					// 7F ext
}
